<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "https://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="Content-Language" content="zh-CN"><link href="stylesheet.css" media="all" rel="stylesheet" type="text/css">
<title>类型转换</title>
<script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?d286c55b63a3c54a1e43d10d4c203e75"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script>
</head><body class="CHAPTER">
<div>
<table summary="Header navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><th colspan="5" align="center" valign="bottom">PostgreSQL 8.2.3 中文文档</th></tr>
<tr><td width="10%" align="left" valign="top"><a href="functions-admin.html" accesskey="P">后退</a></td><td width="10%" align="left" valign="top"><a href="functions.html">快退</a></td><td width="60%" align="center" valign="bottom"></td><td width="10%" align="right" valign="top"><a href="indexes.html">快进</a></td><td width="10%" align="right" valign="top"><a href="typeconv-overview.html" accesskey="N">前进</a></td></tr>
</table>
<hr align="LEFT" width="100%"></div>
<div class="CHAPTER"><h1><a name="TYPECONV"></a>章10. 类型转换</h1>
<div>
<dl>
<dt><b>目录</b></dt>
<dt>10.1. <a href="typeconv-overview.html">概述</a></dt>
<dt>10.2. <a href="typeconv-oper.html">操作符</a></dt>
<dt>10.3. <a href="typeconv-func.html">函数</a></dt>
<dt>10.4. <a href="typeconv-query.html">值存储</a></dt>
<dt>10.5. <a href="typeconv-union-case.html"><tt class="LITERAL">UNION</tt>, <tt class="LITERAL">CASE</tt> 和相关构造</a></dt>
</dl>
</div>
<a name="AEN15586"></a>
<p>SQL 语句可能(有意无意地)要求在同一表达式里混合不同的数据类型。PostgreSQL 在计算混合类型表达式方面有许多扩展性很强的功能。</p>
<p>在大多数情况下，用户不需要明白类型转换机制的细节。但是，由 PostgreSQL 所进行的隐含类型转换会对查询的结果产生影响，必要时这些影响又可以用<span class="emphasis"><i class="EMPHASIS">明确</i></span>类型转换进行剪裁利用。</p>
<p>本章介绍 PostgreSQL 类型转换的传统和机制。关于特定的类型和函数及操作符的进一步信息，请参考<a href="datatype.html">章8</a>和<a href="functions.html">章9</a>里的相关章节。</p>
</div>
<div>
<hr align="LEFT" width="100%">
<table summary="Footer navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td width="33%" align="left" valign="top"><a href="functions-admin.html" accesskey="P">后退</a></td><td width="34%" align="center" valign="top"><a href="index.html" accesskey="H">首页</a></td><td width="33%" align="right" valign="top"><a href="typeconv-overview.html" accesskey="N">前进</a></td></tr>
<tr><td width="33%" align="left" valign="top">系统管理函数</td><td width="34%" align="center" valign="top"><a href="sql.html" accesskey="U">上一级</a></td><td width="33%" align="right" valign="top">概述</td></tr>
</table>
</div>
</body></html>